package org.jeasy.mvc.validate;

import org.jeasy.mvc.validate.annotation.Max;

public class ValidateMax implements ValidateStrategy {
    private Integer value,size;
    private boolean mark;
	@Override
	public boolean doCheck(String parameter,Object obj) {
		Max max=(Max)obj;
		value=max.value();
		size=parameter.length();
		if(value!=null) {
		  mark=size<=value?true:false; 	
		}
		return mark;
	}

}
